package com.gobo.jinghuimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gobo.common.utils.PageUtils;
import com.gobo.jinghuimall.product.entity.AttrEntity;
import com.gobo.jinghuimall.product.entity.AttrGroupEntity;
import com.gobo.jinghuimall.product.vo.AttrGroupRelationVo;
import com.gobo.jinghuimall.product.vo.AttrGroupWithAttrsVo;
import com.gobo.jinghuimall.product.vo.SpuItemAttrGroupVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author guanbo
 * @email gobostart@163.com
 * @date 2021-10-16 20:46:46
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPageByCatelogId(Map<String, Object> params, Long catelogId);

    AttrGroupEntity getByIdAndCatelogPath(Long attrGroupId);

    List<AttrEntity> getAttrRelation(Long attrgroupId);

    void deleteAttrRelation(AttrGroupRelationVo[] attrGroupRelationVo);


    void saveAttrRelation(List<AttrGroupRelationVo> attrGroupRelationVo);

    List<AttrGroupWithAttrsVo> getAttrGroupWithAttrsByCatelogId(Long catelogId);

    List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId, Long catalogId);

}

